package demo.excmaputil.service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import demo.excmaputil.entity.BankCard;
import demo.excmaputil.entity.User;

/**
 * 用户服务
 * 
 * @author jishaocong
 *
 */
public class UserService {
	/**
	 * 获取单个用户
	 * 
	 * @return
	 */
	public User findUser() {
		User user = new User();
		user.setId(1L);
		user.setUsername("张三");
		user.setPhone("13200001234");
		user.setGender(1);
		user.setPassword("c9c8fa9347d44a5a8c73a4ff6ff396bc");
		user.setLastLoginDate(new Date());
		user.setCreateDate(new Date());

		BankCard bankCard = new BankCard();
		bankCard.setId(1L);
		bankCard.setBankName("中国银行");
		bankCard.setCardNum("62141111222233334532");
		bankCard.setCreateDate(new Date());
		bankCard.setValidDate(new Date());
		bankCard.setSafeCode("1234");
		bankCard.setType(1);
		bankCard.setUserId(1L);
		bankCard.setValidDate(new Date());
		List<BankCard> bankCards = new ArrayList<BankCard>();
		bankCards.add(bankCard);

		user.setBankCards(bankCards);

		return user;
	}
}
